package com.cxt.service.impl;

//import com.baomidou.entity.WaypointInfo;
//import com.baomidou.mapper.WaypointInfoMapper;
//import com.baomidou.service.IWaypointInfoService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cxt.Mapper.WaypointInfoMapper;
import com.cxt.entity.WaypointInfo;
import com.cxt.service.IWaypointInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 途径点信息表 服务实现类
 * </p>
 *
 * @author baomidou
 * @since 2025-02-27
 */
@Service
public class WaypointInfoServiceImpl extends ServiceImpl<WaypointInfoMapper, WaypointInfo> implements IWaypointInfoService {
    @Override
    public List<WaypointInfo> getWaypointInfoByCarpoolId(Long carpoolInfoId) {
        // 根据拼车信息ID查询途径点信息
        List<WaypointInfo> waypointInfoList = this.list(new LambdaQueryWrapper<WaypointInfo>().eq(WaypointInfo::getCarpoolInfoId, carpoolInfoId));
        // 确保返回查询结果
        return waypointInfoList;
    }

    //添加方法

}
